using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using ShopPowerTemplate.IoC;
using ShopPowerTemplate.Entities;
using ShopPowerTemplate.Services.Tests.Properties;

namespace ShopPowerTemplate.Services.Tests
{
    public partial class AddressServiceUtil
    {
	
		static internal IAddressService CreateAddressService()
        {
            IAddressService target = IoCFactory.Resolve<IAddressService>();
            return target;
        }
				#region Address Test
 
        

		public static Address CreateAddress()
        {
            Address result = GetAddress();
            IAddressService service = CreateAddressService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
		
		public static Address CreateAddressFull()
        {
            Address result = GetAddressFull();
            IAddressService service = CreateAddressService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
				
        public static Address GetAddress()
        {
            Address result = new Address();
			
            result.AddressLine1 = Guid.NewGuid().ToString();

            result.AddressLine2 = Guid.NewGuid().ToString();

            result.City = Guid.NewGuid().ToString();

            result.StateProvince = Guid.NewGuid().ToString();

            result.PostalCode = Guid.NewGuid().ToString();

            result.Country = Guid.NewGuid().ToString();

            result.IsBilling = true;

        	result.Customer = CustomerServiceUtil.CreateCustomer(); 
 
            return result;
            
        }
		
        public static Address GetAddressFull()
        {
            Address result = GetAddress();
             
            return result;
            
        }
		
		#endregion Address Test
	

	}
}
